home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
tools
/
amigaos4_only
/
ifxlite
/
imagefx3
/
rexx
/
autofx
/
crop.ifx.pre
< prev
next >
Wrap
Text File
|
2004-08-03
|
914b
|
40 lines
/*
* Crop.ifx.pre
* Written by Thomas Krehbiel
*
* Crop to a user-specified size.
*
* Inputs:
* Word(Arg(1),1) = Sequence number
* Word(Arg(1),2) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
*/
OPTIONS RESULTS
base = 'Autofx_Crop_'
x = GETCLIP(base||'x') ; IF x = "" THEN x = 0
y = GETCLIP(base||'y') ; IF y = "" THEN y = 0
w = GETCLIP(base||'w') ; IF w = "" THEN w = 320
h = GETCLIP(base||'h') ; IF h = "" THEN h = 200
Gadget.1 = 'INTEGER 100 5 50 14 "Offset X:"' x
Gadget.2 = 'INTEGER 230 5 50 14 "Offset Y:"' y
Gadget.3 = 'INTEGER 100 20 50 14 "Width:"' w
Gadget.4 = 'INTEGER 230 20 50 14 "Height:"' h
Gadget.5 = 'END'
NewComplexRequest '"Crop"' Gadget 300 50
IF rc ~= 0 THEN EXIT rc
CALL SETCLIP(base||'x', result.1)
CALL SETCLIP(base||'y', result.2)
CALL SETCLIP(base||'w', result.3)
CALL SETCLIP(base||'h', result.4)
EXIT